Part Number Hot Search : 
157332E V674ME02 STUPXXX DS1215 UB1111 TC07VOA 7511G1 MA5532
Product Description
Full Text Search
 

To Download VS1011 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  VS1011 VS1011 VS1011 - mp3 audio codec features 2 decodes mpeg 1 & 2 audio layer 3 (iso 11172-3), wav and pcm ?les 2 supports vbr (variable bitrate) for mp3 2 stream support 2 can be used as a slave co-processor 2 operates with single clock 12.288..14 mhz or 24.576..28 mhz. 2 low-power operation 2 high-quality stereo dac with no phase er- ror between channels 2 stereo earphone driver capable of driving a 30 load 2 separate 2.5 .. 3.6v operating voltages for analog and digital 2 5.5 kib on-chip ram for user code / data 2 serial control and data interfaces 2 new functions may be added with software and 4 gpio pins description VS1011 is a single-chip mp3 audio decoder. the chip contains a high-performance, low-power dsp processor core vs dsp 4 , working memory, 5 kib instruction ram and 0.5 kib data ram for user applications, serial control and input data inter- faces, 4 general purpose i/o pins, as well as a high-quality variable-sample-rate stereo dac, fol- lowed by an earphone ampli?er and a ground buffer. VS1011 receives its input bitstream through a se- rial input bus, which it listens to as a system slave. the input stream is decoded and passed through a digital volume control to an 18-bit oversampling, multi-bit, sigma-delta dac. the decoding is con- trolled via a serial control bus. in addition to the basic decoding, it is possible to add application speci?c features, like dsp effects, to the user ram memory. version 1.00, 2004-10-22 1 vlsi solution y instruction ram instruction rom stereo dac lr stereo ear?phone driver audiooutput x romx ram y rom y ram vsdsp 4 serialdata/ control interface dreqso si sclk xcs VS1011 gpio 4 gpio xdcs
VS1011 VS1011 contents contents 1 license 8 2 disclaimer 8 3 de?nitions 8 4 characteristics & speci?cations 9 4.1 analog characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 4.2 power consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 4.3 dac interpolation filter characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . 10 4.4 absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 4.5 recommended operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4.6 digital characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4.7 switching characteristics - clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4.8 switching characteristics - dreq signal . . . . . . . . . . . . . . . . . . . . . . . . . 12 4.9 switching characteristics - spi interface output . . . . . . . . . . . . . . . . . . . . . . 12 4.10 switching characteristics - boot initialization . . . . . . . . . . . . . . . . . . . . . . . 12 5 packages and pin descriptions 13 5.1 packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.1.1 lqfp-48 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.1.2 bga-49 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.2 lqfp-48 and bga-49 pin descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . 14 6 connection diagram, lqfp-48 15 version 1.00, 2004-10-22 2 vlsi solution y
VS1011 VS1011 contents 7 spi buses 16 7.1 general . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 7.2 spi bus pin descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 7.2.1 vs1002 native modes (new mode) . . . . . . . . . . . . . . . . . . . . . . . . 16 7.2.2 vs1001 compatibility mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 7.3 serial protocol for serial data interface (sdi) . . . . . . . . . . . . . . . . . . . . . . . 17 7.3.1 general . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 7.3.2 sdi in vs1002 native modes (new mode) . . . . . . . . . . . . . . . . . . . . 17 7.3.3 sdi in vs1001 compatibility mode . . . . . . . . . . . . . . . . . . . . . . . . 17 7.3.4 sdi and dreq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 7.4 serial protocol for serial command interface (sci) . . . . . . . . . . . . . . . . . . . . 18 7.4.1 general . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 7.4.2 sci read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 7.4.3 sci write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 7.5 spi timing diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 7.6 spi examples with sm sdinew and sm sdishared set . . . . . . . . . . . . . . . 20 7.6.1 two sci writes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 7.6.2 two sdi bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 7.6.3 sci operation in middle of two sdi bytes . . . . . . . . . . . . . . . . . . . . 20 8 functional description 21 8.1 main features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 8.2 supported audio codecs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 8.2.1 supported mp3 (mpeg layer 3) formats . . . . . . . . . . . . . . . . . . . . . 22 8.2.2 supported riff wav formats . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 version 1.00, 2004-10-22 3 vlsi solution y
VS1011 VS1011 contents 8.3 data flow of VS1011 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 8.4 serial data interface (sdi) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 8.5 serial control interface (sci) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 8.6 sci registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 8.6.1 sci mode (rw) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 8.6.2 sci status (rw) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 8.6.3 sci bass (rw) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 8.6.4 sci clockf (rw) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 8.6.5 sci decode time (rw) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 8.6.6 sci audata (rw) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 8.6.7 sci wram (rw) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 8.6.8 sci wramaddr (rw) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 8.6.9 sci hdat0 and sci hdat1 (r) . . . . . . . . . . . . . . . . . . . . . . . . . 29 8.6.10 sci aiaddr (rw) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 8.6.11 sci vol (rw) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 8.6.12 sci aictrl[x] (rw) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 8.7 stereo audio dac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 9 operation 32 9.1 clocking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 9.2 hardware reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 9.3 software reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 9.4 play/decode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 9.5 feeding pcm data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 9.6 sdi tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 version 1.00, 2004-10-22 4 vlsi solution y
VS1011 VS1011 contents 9.6.1 sine test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 9.6.2 pin test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 9.6.3 memory test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 9.6.4 erk test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 9.6.5 sci test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 10 VS1011 registers 35 10.1 who needs to read this chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 10.2 the processor core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 10.3 VS1011 memory map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 10.4 sci registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 10.5 serial data registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 10.6 dac registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 10.7 gpio registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 10.8 interrupt registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 10.9 system vector tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 10.9.1 audioint, 0x20 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 10.9.2 sciint, 0x21 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 10.9.3 dataint, 0x22 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 10.9.4 usercodec, 0x0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 10.10system vector functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 10.10.1 writeiram(), 0x2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 10.10.2 readiram(), 0x4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 10.10.3 databytes(), 0x6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 10.10.4 getdatabyte(), 0x8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 version 1.00, 2004-10-22 5 vlsi solution y
VS1011 VS1011 contents 10.10.5 getdatawords(), 0xa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 11 document version changes 42 11.1 version 1.00 for VS1011, 2004-10-22 . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 11.2 version 0.71 for VS1011, 2004-07-20 . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 11.3 version 0.70 for VS1011, 2004-05-13 . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 11.4 version 0.62 for VS1011, 2004-03-24 . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 11.5 version 0.61 for VS1011, 2004-03-11 . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 11.6 version 0.6 for VS1011, 2004-02-13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 11.7 version 0.5 for VS1011, 2004-01-15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 11.8 version 0.4 for VS1011, 2003-12-23 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 12 contact information 43 version 1.00, 2004-10-22 6 vlsi solution y
VS1011 VS1011 list of figures list of figures 1 pin con?guration, lqfp-48. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2 pin con?guration, bga-49. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3 typical connection diagram using lqfp-48. . . . . . . . . . . . . . . . . . . . . . . . 15 4 bsync signal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 5 sci word read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 6 sci word write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 7 spi timing diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 8 two sci operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 9 two sdi bytes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 10 two sdi bytes separated by an sci operation. . . . . . . . . . . . . . . . . . . . . . . 21 11 data flow of VS1011. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 12 users memory map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 version 1.00, 2004-10-22 7 vlsi solution y
VS1011 VS1011 1. license 1 license mpeg layer-3 audio decoding technology licensed from fraunhofer iis and thomson. 2 disclaimer all properties and ?gures are subject to change. 3 de?nitions asic application speci?c integrated circuit. b byte, 8 bits. b bit. ic integrated circuit. ki kibi = 2 10 = 1024 (iec 60027-2). mi mebi = 2 20 = 1048576 (iec 60027-2). vs dsp vlsi solutions dsp core. w word. in vs dsp, instruction words are 32-bit and data words are 16-bit wide. version 1.00, 2004-10-22 8 vlsi solution y
VS1011 VS1011 4. characteristics & specifications 4 characteristics & speci?cations unless otherwise noted: avdd=2.7..3.6v, dvdd=2.3..3.6v, ta=-30..+85 c, xtali=26.000mhz, full- scale output sinewave at 1.526 khz, measurement bandwidth 20..20000 hz, analog output load 30 with ground buffer, bitstream 128 kbit/s, local components as shown in figure 3. note, that some analog values are in practice better than in these tables if chips are used within a limited temperature range and not too close to lower voltage limits. 4.1 analog characteristics parameter symbol min typ max unit dac resolution 16 bits total harmonic distortion thd 0.1 0.2 % dynamic range (dac unmuted, a-weighted) idr 88 db s/n ratio (full scale signal) snr 70 81 db interchannel isolation (crosstalk) 1 41 db interchannel isolation (crosstalk) 2 90 db interchannel isolation (crosstalk) 3 70 db interchannel gain mismatch -0.5 0.5 db frequency response, 20..15000 hz -0.2 0.2 db full scale output voltage (peak-to-peak) 1.4 1.6 4 2.1 vpp deviation from linear phase 5 out of band energy -90 db analog output load resistance aolr 30 5 analog output load capacitance 6 10 pf 1 ground buffer, 30 load 2 ground buffer, no load 3 ac coupled towards ground, 30 load 4 double voltage can be achieved with +-to-+ wiring for mono difference sound. 5 aolr may be much lower, but below typical distortion performance may be compromised. 6 use small series resistor if load is capacitive. version 1.00, 2004-10-22 9 vlsi solution y
VS1011 VS1011 4. characteristics & specifications 4.2 power consumption following table measured with xtali=12.288mhz, clock doubler on. parameter symbol min typ max unit power supply rejection 40 db power supply consumption avdd, reset 1.4 30.0 1 a power supply consumption avdd, no load, no signal 6.2 8.0 ma power supply consumption avdd, o. @ 30 . 6.5 40.0 ma power supply consumption dvdd, reset 6.5 30.0 1 a power supply consumption dvdd 16.0 ma 4.3 dac interpolation filter characteristics parameter symbol min typ max unit passband (to -3db corner) 0 0.453 fs passband (ripple spec) 0 0.340 fs passband ripple 0.2 db stop band 0.560fs hz stop band rejection 85 db group delay 15/fs s fs is conversion frequency 4.4 absolute maximum ratings parameter symbol min max unit analog positive supply avdd -0.3 3.6 v digital positive supply dvdd -0.3 3.6 v current at any digital output 50 ma voltage at any digital input dgnd-1.0 dvdd+1.0 v operating temperature -30 +85 c functional operating temperature -40 +95 c storage temperature -65 +150 c version 1.00, 2004-10-22 10 vlsi solution y
VS1011 VS1011 4. characteristics & specifications 4.5 recommended operating conditions parameter symbol min typ max unit analog and digital ground agnd dgnd 0.0 v positive analog avdd 2.5 2.7 3.6 v positive digital dvdd 2.3 2.5 3.6 v ambient operating temperature -30 +85 c the following values are to be used when the clock doubler is active: parameter symbol min typ max unit input clock frequency xtali 12.288 15 mhz internal clock frequency 1 clki 24.576 30 mhz 1 the maximum sample rate that may be played with correct speed is clki/512. the following values are to be used when the clock doubler is not active: parameter symbol min typ max unit input clock frequency xtali 24.576 30 mhz internal clock frequency 1 clki 24.576 30 mhz 1 the maximum sample rate that may be decoded with correct speed is clki/512. note: see application notes for what clock speeds are required to play speci?c bit rates and sample rates. 4.6 digital characteristics parameter symbol min typ max unit high-level input voltage 0.7dvdd v low-level input voltage 0.3dvdd v high-level output voltage at i o = -1.0 ma 0.7dvdd v low-level output voltage at i o = 1.0 ma 0.3dvdd v input leakage current -1.0 1.0 1 a version 1.00, 2004-10-22 11 vlsi solution y
VS1011 VS1011 4. characteristics & specifications 4.7 switching characteristics - clocks parameter symbol min typ max unit master clock frequency 1 xtali 12.288 mhz master clock frequency 2 xtali 24.576 mhz master clock duty cycle 40 50 60 % clock output 3 xtalo xtali mhz 1 clock doubler active. 2 clock doubler not active. 3 do not load xtalo by connecting other devices to it. 4.8 switching characteristics - dreq signal parameter symbol min typ max unit data request signal dreq 200 ns 4.9 switching characteristics - spi interface output parameter symbol min typ max unit spi input clock frequency clki 6 mhz rise time for so 25 ns note: maximum load for so is 100 pf. 4.10 switching characteristics - boot initialization parameter symbol min max unit reset active time 2 xtali power-up to software ready 2 ms + 30000 xtali reset inactive to software ready 30000 xtali version 1.00, 2004-10-22 12 vlsi solution y
VS1011 VS1011 5. packages and pin descriptions 5 packages and pin descriptions 5.1 packages 5.1.1 lqfp-48 figure 1: pin con?guration, lqfp-48. lqfp-48 package dimensions are at http://www.vlsi.?/vs1001/lqfp48.pdf . 5.1.2 bga-49 figure 2: pin con?guration, bga-49. bga-49 package dimensions are at http://www.vlsi.?/vs1001/bga49.pdf . version 1.00, 2004-10-22 13 vlsi solution y 1 48 a bc d e f g 1 2 3 4 5 6 7 top view 0.80 typ 4.807.00 1.10 ref 0.80 typ 1.10 ref 4.807.00 a1 ball pad corner
VS1011 VS1011 5. packages and pin descriptions 5.2 lqfp-48 and bga-49 pin descriptions pin name lqfp- 48 pin bga49 ball pin type function xreset 3 b1 di active low asynchronous reset dgnd0 4 d2 pwr digital ground dvdd0 6 d3 pwr digital power supply dreq 8 e2 do data request, input bus gpio2 2 / dclk 1 9 e1 di general purpose io 2 / serial input data bus clock gpio3 2 / sdata 1 10 f2 di general purpose io 3 / serial data input xdcs / bsync 1 13 e3 di data chip select / byte sync, connect to dvdd if not used dvdd1 14 f3 pwr digital power supply dgnd1 16 f4 pwr digital ground xtalo 17 g3 ao crystal output xtali 18 e4 ai crystal input dvdd2 19 g4 pwr digital power supply dgnd2 20 f5 pwr digital ground (in bga-49, dgnd2, 3, 4 conn. together) dgnd3 21 g5 pwr digital ground dgnd4 22 f6 pwr digital ground xcs 23 g6 di chip select input (active low) sclk 28 d6 di clock for serial bus si 29 e7 di serial input so 30 d5 do3 serial output test 32 c6 di reserved for test, connect to dvdd gpio0 2 33 c7 dio general purpose io 0, use 100 k pull-down resistor gpio1 2 34 b6 dio general purpose io 1 agnd0 37 c5 pwr analog ground, low-noise reference pavdd0 38 b5 pwr analog power supply right 39 a6 ao right channel output agnd1 40 b4 pwr analog ground agnd2 41 a5 pwr analog ground gbuf 42 c4 ao ground buffer avdd1 43 a4 pwr analog power supply rcap 44 b3 aio ?ltering capacitance for reference avdd2 45 a3 pwr analog power supply left 46 b2 ao left channel output agnd3 47 a2 pwr analog ground 1 first pin function is active in new mode, latter in compatibility mode. 2 if not used, use 100 k pull-down resistor. pin types: type description di digital input, cmos input pad do digital output, cmos input pad dio digital input/output do3 digital output, cmos tri-stated output pad type description ai analog input ao analog output aio analog input/output pwr power supply pin in bga-49, no-connect balls are a1, a7, b7, c1, c2, c3, d1, d4, d7, e5, e6, f1, f7, g1, g2, g7. in lqfp-48, no-connect pins are 1, 2, 5, 7, 11, 12, 15, 24, 25, 26, 27, 31, 35, 36, 48. version 1.00, 2004-10-22 14 vlsi solution y
VS1011 VS1011 6. connection diagram, lqfp-48 6 connection diagram, lqfp-48 figure 3: typical connection diagram using lqfp-48. the ground buffer gbuf can be used for common voltage (1.25 v) for earphones. this will eliminate the need for large isolation capacitors on line outputs, and thus the audio output pins from VS1011 may be connected directly to the earphone connector. if gbuf is not used, left and right must be provided with 100 1 f capacitors. note: this connection assumes sm sdinew is active (see chapter 8.6.1). if also sm sdishare is used, xdcs doesnt need to be connected (see chapter 7.2.1). version 1.00, 2004-10-22 15 vlsi solution y
VS1011 VS1011 7. spi buses 7 spi buses 7.1 general the spi bus - that was originally used in some motorola devices - has been used for both VS1011s serial data interface sdi (chapters 7.3 and 8.4) and serial control interface sci (chapters 7.4 and 8.5). 7.2 spi bus pin descriptions 7.2.1 vs1002 native modes (new mode) these modes are active on VS1011 when sm sdinew is set to 1. dclk, sdata and bsync are replaced with gpio2, gpio3 and xdcs, respectively. sdi pin sci pin description xdcs xcs active low chip select input. a high level forces the serial interface into standby mode, ending the current operation. a high level also forces serial output (so) to high impedance state. if sm sdishare is 1, pin xdcs is not used, but the signal is generated internally by inverting xcs. sck serial clock input. the serial clock is also used internally as the master clock for the register interface. sck can be gated or continuous. in either case, the ?rst rising clock edge after xcs has gone low marks the ?rst bit to be written. si serial input. if a chip select is active, si is sampled on the rising clk edge. - so serial output. in reads, data is shifted out on the falling sck edge. in writes so is at a high impedance state. 7.2.2 vs1001 compatibility mode this mode is active when sm sdinew is 0 (default). in this mode, dclk, sdata and bsync are active. sdi pin sci pin description - xcs active low chip select input. a high level forces the serial interface into standby mode, ending the current operation. a high level also forces serial output (so) to high impedance state. there is no chip select for sdi, which is always active. dclk sck serial clock input. the serial clock is also used internally as the master clock for the register interface. sck can be gated or continuous. in either case, the ?rst rising clock edge after xcs has gone low marks the ?rst bit to be written. sdata si serial input. si is sampled on the rising sck edge, if xcs is low. - so serial output. in reads, data is shifted out on the falling sck edge. in writes so is at a high impedance state. version 1.00, 2004-10-22 16 vlsi solution y
VS1011 VS1011 7. spi buses 7.3 serial protocol for serial data interface (sdi) 7.3.1 general the serial data interface operates in slave mode so the dclk signal must be generated by an external circuit. data (sdata signal) can be clocked in at either the rising or falling edge of dclk (chapter 8.6). VS1011 assumes its data input to be byte-sychronized. sdi bytes may be transmitted either msb or lsb ?rst, depending of contents of sci mode (chapter 8.6). 7.3.2 sdi in vs1002 native modes (new mode) in vs1002 native modes (which are available also in VS1011), byte synchronization is achieved by xdcs (or xcs if sm sdishare is 1). the state of xdcs (or xcs) may not change while a data byte transfer is in progress. to always maintain data synchronization even if there may be glitches in the boards using VS1011, it is recommended to turn xdcs (or xcs) every now and then, for instance once after every ?ash data block or a few kilobytes, just to keep sure the host and VS1011 are in sync. for new designs, using vs1002 native modes are recommended, as they are easier to implement than bsync generation. 7.3.3 sdi in vs1001 compatibility mode figure 4: bsync signal. when VS1011b is running in vs1001 compatibility mode, a bsync signal must be generated to ensure correct byte-alignment of the input bitstream. the ?rst dclk sampling edge (rising or falling, depending on selected polarity), during which the bsync is high, marks the ?rst bit of a byte (lsb if lsb-?rst order is used, msb if msb-?rst order is used). 7.3.4 sdi and dreq the dreq signal of the data interface is used in slave mode to signal if VS1011s fifo is capable of receiving more input data. if dreq is high, VS1011 can take at least 32 bytes of data. when there is less than 32 bytes of free space, dreq is turned low, and the sender should stop transferring new data. version 1.00, 2004-10-22 17 vlsi solution y bsyncsdata dclk d7 d6 d5 d4 d3 d2 d1 d0
VS1011 VS1011 7. spi buses because of the 32-byte safety area, the sender may send upto 32 bytes of data at a time without checking the status of dreq, making controlling VS1011 easier for low-speed microcontrollers. note: dreq may turn low or high at any time, even during a byte transmission. thus, dreq should only be used to decide whether to send more bytes. it should not abort a byte transmission that has already started. 7.4 serial protocol for serial command interface (sci) 7.4.1 general the serial bus protocol for the serial command interface sci (chapter 8.5) consists of an instruction byte, address byte and one 16-bit data word. each read or write operation can read or write a single register. data bits are read at the rising edge, so the user should update data at the falling edge. bytes are always send msb ?rrst. the operation is speci?ed by an 8-bit instruction opcode. the supported instructions are read and write. see table below. instruction name opcode operation read 0000 0011 read data write 0000 0010 write data note: after sending an sci command, it is not allowed to send sci or sdi data for 5 microseconds. 7.4.2 sci read VS1011 registers are read by the following sequence, as shown in figure 5. first, xcs line is pulled si line followed by an 8-bit word address. after the address has been read in, any further data on si is ignored. the 16-bit data corresponding to the received address will be shifted out onto the so line. xcs should be driven high after data has been shifted out. 7.4.3 sci write VS1011 registers are written to using the following sequence, as shown in figure 6. first, xcs line is pulled low to select the device. then the write opcode (0x2) is transmitted via the si line followed by an 8-bit word address. after the word has been shifted in and the last clock has been sent, xcs should be pulled high to end the write sequence. version 1.00, 2004-10-22 18 vlsi solution y
VS1011 VS1011 7. spi buses figure 5: sci word read figure 6: sci word write 7.5 spi timing diagram symbol min max unit txcss 5 ns tsu -26 ns th 2 xtali cycles tz 0 ns twl 2 xtali cycles twh 2 xtali cycles tv 2 (+ 25ns 1 ) xtali cycles txcsh -26 ns txcs 2 xtali cycles tdis 10 ns 1 25ns is when pin loaded with 100pf capacitance. the time is shorter with lower capacitance. note: as twl and twh, as well as th require at least 2 clock cycles, the maximum speed for the spi bus that can easily be used is 1/6 of VS1011s external clock speed xtali. slightly higher speed can be achieved with very careful timing tuning. for details, see application notes for vs10xx. note: negative numbers mean that the signal can change in different order from what is shown in the diagram. version 1.00, 2004-10-22 19 vlsi solution y 0 1 2 3 4 5 6 7 8 9 10 11 12 13 30 31 14 15 16 17 0 0 0 0 0 0 1 1 0 0 0 0 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 14 1 0 x instruction (read) address data out xcssck si so don't care don't care 0 1 2 3 4 5 6 7 8 9 10 11 12 13 30 31 14 15 16 17 0 0 0 0 0 0 1 0 0 0 0 3 2 1 0 1 0 x address xcssck si 15 14 data out 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 so 0 0 0 0 x 0 instruction (write)
VS1011 VS1011 7. spi buses figure 7: spi timing diagram. 7.6 spi examples with sm sdinew and sm sdishared set 7.6.1 two sci writes figure 8: two sci operations. figure 8 shows two consecutive sci operations. note that xcs must be raised to inactive state between the writes. 7.6.2 two sdi bytes sdi data is synchronized with a raising edge of xcs as shown in figure 9. however, every byte doesnt need separate synchronization. 7.6.3 sci operation in middle of two sdi bytes figure 10 shows how an sci operation is embedded in between sdi operations. the changes in xcs are used to synchronize both sdi and sci. version 1.00, 2004-10-22 20 vlsi solution y xcssck si so 0 1 15 14 16 txcss txcsh twl twh th tsu tv tz tdis txcs 30 31 0 1 2 3 30 31 1 0 1 0 0 0 0 0 0 0 x x xcs scksi 2 32 33 61 62 63 sci write 1 sci write 2
VS1011 VS1011 8. functional description figure 9: two sdi bytes. figure 10: two sdi bytes separated by an sci operation. 8 functional description 8.1 main features VS1011 is based on a proprietary digital signal processor, vs dsp. it contains all the code and data memory needed for mpeg and wav pcm audio decoding, together with serial interfaces, a multirate stereo audio dac and analog output ampli?ers and ?lters. VS1011 can play all mpeg 1 and 2 layer iii ?les, with all sample rates and bitrates, including variable bitrate (vbr). 8.2 supported audio codecs conventions mark description + format is supported - format exists but is not supported format doesnt exist version 1.00, 2004-10-22 21 vlsi solution y 1 2 3 xcs scksi 7 6 5 4 3 1 0 7 6 5 2 1 0 x sdi byte 1 sdi byte 2 0 6 7 8 9 13 14 15 0 1 xcs scksi 6 7 7 6 5 1 0 0 0 1 0 7 6 5 1 0 sdi byte sci operation sdi byte 8 9 38 39 40 41 46 47 x
VS1011 VS1011 8. functional description 8.2.1 supported mp3 (mpeg layer 3) formats mpeg 1.0 1 : samplerate / hz bitrate / kbit/s 32 40 48 56 64 80 96 112 128 160 192 224 256 320 48000 + + + + + + + + + + + + + 3 + 3 44100 + + + + + + + + + + + + + + 3 32000 + + + + + + + + + + + + + + mpeg 2.0 1 : samplerate / hz bitrate / kbit/s 8 16 24 32 40 48 56 64 80 96 112 128 144 160 24000 + + + + + + + + + + + + + + 22050 + + + + + + + + + + + + + + 16000 + + + + + + + + + + + + + + mpeg 2.5 1 2 : samplerate / hz bitrate / kbit/s 8 16 24 32 40 48 56 64 80 96 112 128 144 160 12000 + + + + + + + + + + + + + + 11025 + + + + + + + + + + + + + + 8000 + + + + + + + + + + + + + + 1 also all variable bitrate (vbr) formats are supported. 2 incompatibilities may occur because mpeg 2.5 is not a standard format. 3 nominal clki=24.576 mhz may be too little for glitchless playback. version 1.00, 2004-10-22 22 vlsi solution y
VS1011 VS1011 8. functional description 8.2.2 supported riff wav formats the most common riff wav subformats are supported. format name supported comments 0x01 pcm + 16 and 8 bits, any sample rate 48 khz 0x02 adpcm - 0x03 ieee float - 0x06 alaw - 0x07 mulaw - 0x10 oki adpcm - 0x11 ima adpcm - 0x15 digistd - 0x16 digifix - 0x30 dolby ac2 - 0x31 gsm610 - 0x3b rockwell adpcm - 0x3c rockwell digitalk - 0x40 g721 adpcm - 0x41 g728 celp - 0x50 mpeg - 0x55 mpeglayer3 + for supported mp3 modes, see chapter 8.2.1 0x64 g726 adpcm - 0x65 g722 adpcm - 8.3 data flow of VS1011 figure 11: data flow of VS1011. first, depending on the audio data, mp3 or pcm wav data is received and decoded from the sdi bus. after decoding, data may be sent to the bass enhancer depending on sci bass. then, if sci aiaddr is non-zero, application code is executed from the address pointed to by that register. for more details, see application notes for vs10xx. after the optional user application, the signal is fed to the volume control unit, which also copies the data to the audio fifo. the audio fifo holds the data, which is read by the audio interrupt (chapter 10.9.1) and fed to the sample rate converter and dacs. the size of the audio fifo is 512 stereo (2 16-bit) samples. the sample rate converter converts all different sample rates to clki/512 and feeds the data to the dac, which in order creates a stereo in-phase analog signal. this signal is then forwarded to the earphone ampli?er. version 1.00, 2004-10-22 23 vlsi solution y bitstreamfifo volumecontrol audiofifo s.rate.conv.and dac userapplication r a1addr = 0 a1addr != 0 16384 bits 512 stereo samples sdi l mp3/wavdecoding bassenhancer sci_bass = 0sci_bass != 0 sci_vol
VS1011 VS1011 8. functional description 8.4 serial data interface (sdi) the serial data interface is meant for transferring compressed mp3 audio data as well as wav pcm data. also several different tests may be activated through sdi as described in chapter 9. 8.5 serial control interface (sci) the serial control interface is compatible with the spi bus speci?cation. data transfers are always 16 bits. VS1011 is controlled by writing and reading the registers of the interface. the main controls of the control interface are: 2 control of the operation mode 2 uploading user programs 2 access to header data 2 status information 2 feeding input data 8.6 sci registers sci registers, pre?x sci , offset 0xc000 reg type reset abbrev[bits] description 0x0 rw 0 mode mode control. 0x1 rw 0x1c 1 status status of VS1011. 0x2 rw 0 bass built-in bass enhancer. 0x3 rw 0 clockf clock freq + doubler. 0x4 r 0 decode time decode time in seconds. 0x5 rw 0 audata misc. audio data. 0x6 rw 0 wram ram write. 0x7 rw 0 wramaddr base address for ram write. 0x8 r 0 hdat0 stream header data 0. 0x9 r 0 hdat1 stream header data 1. 0xa rw 0 aiaddr start address of application. 0xb rw 0 vol volume control. 0xc rw 0 aictrl0 application control register 0. 0xd rw 0 aictrl1 application control register 1. 0xe rw 0 aictrl2 application control register 2. 0xf rw 0 aictrl3 application control register 3. 1 firmware changes the value of this register immediately to 0x18, and in less than 100 ms to 0x10. version 1.00, 2004-10-22 24 vlsi solution y
VS1011 VS1011 8. functional description 8.6.1 sci mode (rw) sci mode is used to control operation of VS1011. bit name function value description 0 sm diff differential 0 normal in-phase audio 1 left channel inverted 1 sm settozero set to zero 0 right 1 wrong 2 sm reset soft reset 0 no reset 1 reset 3 sm outofwav jump out of wav decoding 0 no 1 yes 4 sm pdown powerdown 0 power on 1 powerdown 5 sm tests allow sdi tests 0 not allowed 1 allowed 6 sm stream stream mode 0 no 1 yes 7 sm settozero1 set to zero 0 right 1 wrong, this isnt zero 8 sm dact dclk active edge 0 rising 1 falling 9 sm sdiord sdi bit order 0 msb ?rst 1 msb last 10 sm sdishare share spi chip select 0 no 1 yes 11 sm sdinew vs1002 native spi modes 0 no 1 yes 12 sm settozero2 set to zero 0 right 1 wrong, this isnt zero 13 sm settozero3 set to zero 0 right 1 wrong, this isnt zero when sm diff is set, the player inverts the left channel output. for a stereo input this creates a virtual surround, and for a mono input this effectively creates a differential left/right signal. by setting sm reset to 1, the player is software reset. this bit clears automatically. when the user decoding a wav ?le wants to get out of the ?le without playing it to the end, set sm outofwav, and send zeros to vs1002c until sm outofwav is again zero. if the user doesnt want to check sm outofwav, send 128 zeros. bit sm pdown sets VS1011 into software powerdown mode. note that software powerdown is not nearly as power ef?cient as hardware powerdown activated with the xreset pin. if sm tests is set, sdi tests are allowed. for more details on sdi tests, look at chapter 9.6. version 1.00, 2004-10-22 25 vlsi solution y
VS1011 VS1011 8. functional description sm stream activates VS1011s stream mode. in this mode, data should be sent with as even intervals as possible (and preferable with data blocks of less than 512 bytes), and VS1011 makes every attempt to keep its input buffer half full by changing its playback speed upto 5%. for best quality sound, the average speed error should be within 0.5%, the bitrate should not exceed 160 kbit/s and vbr should not be used. for details, see application notes for vs10xx. sm settozero should always be set to 0. sm dact de?nes the active edge of data clock for sdi. if clear data is read at the rising edge, and if set data is read at the falling edge. when sm sdiord is clear, bytes on sdi are sent as a default msb ?rst. by setting sm sdiord, the user may reverse the bit order for sdi, i.e. bit 0 is received ?rst and bit 7 last. bytes are, however, still sent in the default order. this register bit has no effect on the sci bus. setting sm sdishare makes sci and sdi share the same chip select, as explained in chapter 7.2, if also sm sdinew is set. setting sm sdinew will activate vs1002 native serial modes as described in chapters 7.2.1 and 7.3.2. 8.6.2 sci status (rw) sci status contains information on the current status of VS1011 and lets the user shutdown the chip without audio glitches. name bits description ss ver 6..4 version ss apdown2 3 analog driver powerdown ss apdown1 2 analog internal powerdown ss avol 1..0 analog volume control ss ver is 0 for vs1001, 1 for VS1011, 2 for vs1002 and 3 for vs1003. ss apdown2 controls analog driver powerdown. normally this bit is controlled by the system ?rmware. however, if the user wants to powerdown VS1011 with a minimum power-off transient, turn this bit to 1, then wait for at least a few milliseconds before activating reset. for more details, see application notes for vs10xx. ss apdown1 controls internal analog powerdown. this bit is meant to be used by the system ?rmware only. ss avol is the analog volume control: 0 = -0 db, 1 = -6 db, 3 = -12 db. this register is meant to be used automatically by the system ?rmware only. version 1.00, 2004-10-22 26 vlsi solution y
VS1011 VS1011 8. functional description 8.6.3 sci bass (rw) name bits description sb amplitude 7..4 enhancement in 1 db steps (0..15) sb freqlimit 3..0 lower limit frequency in 10 hz steps (2..15) the bass enhancer vsbe is a powerful bass boosting dsp algorithm, which tries to take the most out of the users earphones without causing clipping. vsbe is activated when sb amplitude is set to non-zero. sb amplitude should be set to the users preferences, and sb freqlimit to roughly 1.5 times the lowest frequency the users audio system can reproduce. note: because vsbe tries to avoid clipping, it gives the best bass boost with dynamical music material, or when the playback volume is not set to maximum. 8.6.4 sci clockf (rw) sci clockf is used to tell if the input clock xtali is running at something else than 24.576 mhz. xtali is set in 2 khz steps. thus, the formula for calculating the correct value for this register is xt ali 2000 (xtali is in hz). values may be between 0..32767, although hardware limits the highest allowed speed. also, with speeds lower than 24.576 mhz all sample rates and bitstream widths are no longer available. setting the msb of sci clockf to 1 activates internal clock-doubling. a clock of upto 15 mhz may be doubled depending on the voltage provided to the chip. note: sci clockf must be set before beginning decoding audio data; otherwise the sample rate will not be set correctly. note: sci clockf needs to be rewritten after each software reset. this is different from how vs1002 operates. example 1: for a 26 mhz clock the value would be 26000000 2000 = 13000 . example 2: for a 13 mhz external clock and using internal clock-doubling for a 26 mhz internal frequency, the value would be 0 x 8000 + 13000000 2000 = 39268 . example 3: for a 24.576 mhz clock the value would be either 24576000 2000 = 12288 , or just the default value 0 . for this clock frequency, sci clockf doesnt need to be set. 8.6.5 sci decode time (rw) when decoding correct data, current decoded time is shown in this register in full seconds. the user may change the value of this register. however, in that case the new value should be written version 1.00, 2004-10-22 27 vlsi solution y
VS1011 VS1011 8. functional description twice. sci decode time is reset at every software reset. 8.6.6 sci audata (rw) when decoding correct data, the current sample rate and number of channels can be found in bits 15..1 and 0 of sci audata, respectively. bits 15..1 contain the sample rate divided by two, and bit 0 is 0 for mono data and 1 for stereo. writing to this register will change the sample rate on the run to the number given. example: 44100 hz stereo data reads as 0xac45 (44101). 8.6.7 sci wram (rw) sci wram is used to upload application programs and data to instruction and data rams. the start address must be initialized by writing to sci wramaddr prior to the ?rst call of sci wram. as 16 bits of data can be transferred with one sci wram write, and the instruction word is 32 bits long, two consecutive writes are needed for each instruction word. the byte order is big-endian (i.e. msbs ?rst). after each full-word write, the internal pointer is autoincremented. sm wramaddr dest. addr. bits/ description start. . . end start. . . end word 0x1380. . . 0x13ff 0x1380. . . 0x13ff 16 x data ram 0x4780. . . 0x47ff 0x0780. . . 0x07ff 16 y data ram 0x8030. . . 0x84ff 0x0030. . . 0x04ff 32 instruction ram 8.6.8 sci wramaddr (rw) sci wramaddr is used to set the program address for following sci wram writes. version 1.00, 2004-10-22 28 vlsi solution y
VS1011 VS1011 8. functional description 8.6.9 sci hdat0 and sci hdat1 (r) bit function value explanation hdat1[15:5] syncword 2047 stream valid hdat1[4:3] id 3 iso 11172-3 1.0 2 mpg 2.0 (1/2-rate) 1 mpg 2.5 (1/4-rate) 0 mpg 2.5 (1/4-rate) hdat1[2:1] layer 3 i 2 ii 1 iii 0 reserved hdat1[0] protect bit 1 no crc 0 crc protected hdat0[15:12] bitrate iso 11172-3 hdat0[11:10] sample rate 3 reserved 2 32/16/8 khz 1 48/24/12 khz 0 44/22/11 khz hdat0[9] pad bit 1 additional slot 0 normal frame hdat0[8] private bit not de?ned hdat0[7:6] mode 3 mono 2 dual channel 1 joint stereo 0 stereo hdat0[5:4] extension iso 11172-3 hdat0[3] copyright 1 copyrighted 0 free hdat0[2] original 1 original 0 copy hdat0[1:0] emphasis 3 ccitt j.17 2 reserved 1 50/15 microsec 0 none when read, sci hdat0 and sci hdat1 contain header information that is extracted from mpeg stream being currently being decoded. right after resetting VS1011, 0 is automatically written to both registers, indicating no data has been found yet. the sample rate ?eld in sci hdat0 is interpreted according to the following table: sample rate id=3 / hz id=2 / hz id=0,1 / hz 3 - - - 2 32000 16000 8000 1 48000 24000 12000 0 44100 22050 11025 the bitrate ?eld in hdat0 is read according to the following table: version 1.00, 2004-10-22 29 vlsi solution y
VS1011 VS1011 8. functional description bitrate id=3 / kbit/s id=0,1,2 / kbit/s 15 forbidden forbidden 14 320 160 13 256 144 12 224 128 11 192 112 10 160 96 9 128 80 8 112 64 7 96 56 6 80 48 5 64 40 4 56 32 3 48 24 2 40 16 1 32 8 0 - - when decoding a wav ?le, spi hdat0 and spi hdat1 read as 0x7761, and 0x7665, respectively. 8.6.10 sci aiaddr (rw) sci aiaddr indicates the start address of the application code written earlier with sci wramaddr and sci wram registers. if no application code is used, this register should not be initialized, or it should be initialized to zero. for more details, see application notes for vs10xx. 8.6.11 sci vol (rw) sci vol is a volume control for the player hardware. for each channel, a value in the range of 0..191 or 255 may be de?ned to set its attenuation from the maximum volume level (in 0.5 db steps). the left channel value is then multiplied by 256 and the values are added. thus, maximum volume is 0 and total silence if 0xffff. example: for a volume of -2.0 db for the left channel and -3.5 db for the right channel: (4*256) + 7 = 0x407. note, that at startup volume is set to full volume. resetting the software does not reset the volume setting. note: setting the volume to total silence (255 for both left and right channels) will turn analog power off. 8.6.12 sci aictrl[x] (rw) sci aictrl[x] registers ( x=[0 .. 3] ) can be used to access the users application program. version 1.00, 2004-10-22 30 vlsi solution y
VS1011 VS1011 8. functional description 8.7 stereo audio dac decoded digital data is transformed into analog format by an 18/20-bit oversampling multi-bit sigma- delta d/a converter. the oversampled output is low-pass ?ltered by an on-chip analog ?lter. the output rate of the d/a converter is always 1/4 of the clock rate, or 128 times the highest usable sample rate. for instance for a 24.576 mhz clock, the d/a converter operates at 128x48 khz, which is 6.144 mhz. if the input sample rate is other than 48 khz, it is internally converted to 48 khz by the dac. this removes the need for complex pll-based clocking schemes and allows almost unlimited sample rate accuracy with one ?xed master clock frequency. if the input ot the decoder is invalid or it is not received fast enough, analog outputs are automatically muted. version 1.00, 2004-10-22 31 vlsi solution y
VS1011 VS1011 9. operation 9 operation 9.1 clocking VS1011 operates on a single, nominally 24.576 mhz fundamental frequency master clock. this clock can be generated by external circuitry (connected to pin xtali) or by the internal clock chrystal interface (pins xtali and xtalo). this clock is suf?cient to support a high quality audio output for almost all standard sample rates and bit-rates (see application notes for vs10xx). 9.2 hardware reset when the xreset -signal is driven low, VS1011 is reset and all the control registers and internal states are set to the initial values. xreset-signal is asynchronous to any external clock. the reset mode doubles as a full-powerdown mode, where both digital and analog parts of VS1011 are in minimum power consumption stage, and where clocks are stopped. also xtalo and xtali are grounded. after a hardware reset (or at power-up), the user should set such basic software registers as sci vol for volume (and sci clockf if the input clock is anything else than 24.576 mhz) before starting decoding. 9.3 software reset in some cases the decoder software has to be reset. this is done by activating bit 2 in sci mode register (chapter 8.6.1). then wait for at least 2 1 s, then look at dreq. dreq will stay down for at least 6000 clock cycles, which means an approximate 250 1 s delay if VS1011 is run at 24.576 mhz. after dreq is up, you may continue playback as usual. if you want to make sure VS1011 doesnt cut the ending of low-bitrate data streams and you want to do a software reset, it is recommended to feed 2048 zeros to the sdi bus after the ?le and before the reset. 9.4 play/decode this is the normal operation mode of VS1011. sdi data is decoded. decoded samples are converted to analog domain by the internal dac. if there are bad problems in the decoding process, the error ?ags of sci hdat0 and sci hdat1 are set to 0 and analog outputs are muted. when there is no input for decoding, VS1011 goes into idle mode (lower power consumption than during decoding) and actively monitors the serial data input for valid data. version 1.00, 2004-10-22 32 vlsi solution y
VS1011 VS1011 9. operation 9.5 feeding pcm data VS1011 can be used as a pcm decoder by sending to it a wav ?le header. if the length sent in the wav ?le is 0 or 0xfffffff, VS1011 will stay in pcm mode inde?nitely. 8-bit linear and 16-bit linear audio is supported in mono or stereo. 9.6 sdi tests there are several test modes in VS1011, which allow the user to perform memory tests, sci bus tests, and several different sine wave tests. all tests are started in a similar way: VS1011 is hardware reset, sm tests is set, and then a test command is sent to the sdi bus. each test is started by sending a 4-byte special command sequence, followed by 4 zeros. the sequences are described below. 9.6.1 sine test sine test is initialized with the 8-byte sequence 0x53 0xef 0x6e n 0 0 0 0, where n de?nes the sine test to use. n is de?ned as follows: n bits name bits description f s idx 7:5 sample rate index s 4:0 sine skip speed f s idx f s 0 44100 hz 1 48000 hz 2 32000 hz 3 22050 hz 4 24000 hz 5 16000 hz 6 11025 hz 7 12000 hz the frequency of the sine to be output can now be calculated from f = f s s 128 . example: sine test is activated with value 126, which is 0b01111110. breaking n to its components, f s idx = 0 b 011 = 1 and thus f s = 22050 hz . s = 0 b 11110 = 30 , and thus the ?nal sine frequency f = 22050 hz 30 128 ? 5168 hz . to exit the sine test, send the sequence 0x45 0x78 0x69 0x74 0 0 0 0. note: sine test signals go through the digital volume control, so it is possible to test channels separately. version 1.00, 2004-10-22 33 vlsi solution y
VS1011 VS1011 9. operation 9.6.2 pin test pin test is activated with the 8-byte sequence 0x50 0xed 0x6e 0x54 0 0 0 0. this test is meant for chip production testing only. 9.6.3 memory test memory test mode is initialized with the 8-byte sequence 0x4d 0xea 0x6d 0x54 0 0 0 0. after this sequence, wait for 200000 clock cycles. the result can be read from the sci register sci hdat0, and one bits are interpreted as follows: bit(s) meaning 15 test ?nished 14..7 unused 6 mux test succeeded 5 good i ram 4 good y ram 3 good x ram 2 good i rom 1 good y rom 0 good x rom memory tests overwrite the current contents of the ram memories. 9.6.4 erk test erk test is activated with the 8-byte sequence 0xcb 0x72 0x6b 0x54 0 0 0 0. this test is meant for chip production testing only. 9.6.5 sci test sci test is initialized with the 8-byte sequence 0x53 0x70 0xee n 0 0 0 0, where n ? 48 is the register number to test. the content of the given register is read and copied to sci hdat0. if the register to be tested is hdat0, the result is copied to sci hdat1. example: if n is 48, contents of sci register 0 (sci mode) is copied to sci hdat0. version 1.00, 2004-10-22 34 vlsi solution y
VS1011 VS1011 10. VS1011 registers 10 VS1011 registers 10.1 who needs to read this chapter user software is required when a user wishes to add some own functionality like dsp effects or tone controls to VS1011. however, most users of VS1011 dont need to worry about writing their own code, or about this chapter, including those who only download software plug-ins from vlsi solutions web site. 10.2 the processor core vs dsp is a 16/32-bit dsp processor core that also had extensive all-purpose processor features. vlsi solutions free vskit software package contains all the tools and documentation needed to write, sim- ulate and debug assembly language or extended ansi c programs for the vs dsp processor core. vlsi solution also offers a full integrated development environment vside for full debug capabilities. 10.3 VS1011 memory map VS1011s memory map is shown in figure 12. 10.4 sci registers sci registers described in chapter 8.6 can be found here between 0xc000..0xc00f. in addition to these registers, there is one in address 0xc010, called spi change. spi registers, pre?x spi reg type reset abbrev[bits] description 0xc010 r 0 change[5:0] last sci access address. spi change bits name bits description spi ch write 4 1 if last access was a write cycle. spi ch addr 3:0 spi address of last access. version 1.00, 2004-10-22 35 vlsi solution y
VS1011 VS1011 10. VS1011 registers figure 12: users memory map. 10.5 serial data registers sdi registers, pre?x ser reg type reset abbrev[bits] description 0xc011 r 0 data last received 2 bytes, big-endian. 0xc012 w 0 dreq[0] dreq pin control. version 1.00, 2004-10-22 36 vlsi solution y 0000 0000 stack stack instruction (32?bit) y (16?bit) x (16?bit) system vectors userspace y data rom x data rom 40006000 40006000 7000 7000 instruction rom hardware register space c000c100 c100 c000 0098 0098 1380 userspace 1400 13801400 1800 1800 userinstruction ram x data ram y data ram 0c00 0800 0780 07800800 0c00 0030 0030 0500 0500
VS1011 VS1011 10. VS1011 registers 10.6 dac registers dac registers, pre?x dac reg type reset abbrev[bits] description 0xc013 rw 0 fctll dac frequency control, 16 lsbs. 0xc014 rw 0 fctlh[4:0] clock doubler + dac frequency control msbs. 0xc015 rw 0 left dac left channel pcm value. 0xc016 rw 0 right dac right channel pcm value. every fourth clock cycle, an internal 26-bit counter is added to by dac fctlh[3:0] 65536 + dac fctll. whenever this counter over?ows, values from dac left and dac right are read and a dac inter- rupt is generated. if dac fctl[4] is 1, the internal clock doubler is activated. 10.7 gpio registers gpio registers, pre?x gpio reg type reset abbrev[bits] description 0xc017 rw 0 ddr[3:0] direction. 0xc018 r 0 idata[3:0] values read from the pins. 0xc019 rw 0 odata[3:0] values set to the pins. gpio dir is used to set the direction of the gpio pins. 1 means output. gpio odata remembers its values even if a gpio dir bit is set to input. gpio registers dont generate interrupts. note: bits 2 and 3 of gpio ddr and gpio odata are switched in some pre-production VS1011s dated 2003. thus, for example, writing 8 to both registers in such a chip will set pin gpio2 to 1 instead of gpio3. version 1.00, 2004-10-22 37 vlsi solution y
VS1011 VS1011 10. VS1011 registers 10.8 interrupt registers interrupt registers, pre?x int reg type reset abbrev[bits] description 0xc01a rw 0 enable[2:0] interrupt enable. 0xc01b w 0 glob dis[-] write to add to interrupt counter. 0xc01c w 0 glob ena[-] write to subtract from interript counter. 0xc01d rw 0 counter[4:0] interrupt counter. int enable controls the interrupts. the control bits are as follows: int enable bits name bits description int en sdi 2 enable data interrupt. int en sci 1 enable sci interrupt. int en dac 0 enable dac interrupt. note: it may take upto 6 clock cycles before changing int enable has any effect. writing any value to int glob dis adds one to the interrupt counter int counter and effectively disables all interrupts. it may take upto 6 clock cycles before writing to this register has any effect. writing any value to int glob ena subtracts one from the interrupt counter (unless int counter already was 0). if the interrupt counter becomes zero, interrupts selected with int enable are re- stored. an interrupt routine should always write to this register as the last thing it does, because in- terrupts automatically add one to the interrupt counter, but subtracting it back to its initial value is the responsibility of the user. it may take upto 6 clock cycles before writing this register has any effect. by reading int counter the user may check if the interrupt counter is correct or not. if the register is not 0, interrupts are disabled. version 1.00, 2004-10-22 38 vlsi solution y
VS1011 VS1011 10. VS1011 registers 10.9 system vector tags the system vector tags are tags that may be replaced by the user to take control over several decoder functions. 10.9.1 audioint, 0x20 normally contains the following vs dsp assembly code: jmpi dac_int_address,(i6)+1 the user may, at will, replace the instruction with a jmpi command to gain control over the audio interrupt. 10.9.2 sciint, 0x21 normally contains the following vs dsp assembly code: jmpi sci_int_address,(i6)+1 the user may, at will, replace the instruction with a jmpi command to gain control over the sci interrupt. 10.9.3 dataint, 0x22 normally contains the following vs dsp assembly code: jmpi sdi_int_address,(i6)+1 the user may, at will, replace the instruction with a jmpi command to gain control over the sdi interrupt. 10.9.4 usercodec, 0x0 normally contains the following vs dsp assembly code: jr nop if the user wants to take control away from the standard decoder, the ?rst instruction should be replaced with an appropriate j command to users own code. version 1.00, 2004-10-22 39 vlsi solution y
VS1011 VS1011 10. VS1011 registers unless the user is feeding mp3 data at the same time, the system activates the user program in less than 1 ms. after this, the user should steal interrupt vectors from the system, and insert user programs. 10.10 system vector functions the system vector functions are pointers to some functions that the user may call to help implementing his own applications. 10.10.1 writeiram(), 0x2 vs dsp c prototype: void writeiram(register i0 u int16 *addr, register a1 u int16 msw, register a0 u int16 lsw); this is the only supported way to write to the user instruction ram. this is because instruction ram cannot be written when program control is in ram. thus, the actual implementation of this function is in rom, and here is simply a tag to that routine. 10.10.2 readiram(), 0x4 vs dsp c prototype: u int32 readiram(register i0 u int16 *addr); this is the only supported way to read from the user instruction ram. this is because instruction ram cannot be read when program control is in ram. thus, the actual implementation of this function is in rom, and here is simply a tag to that routine. a1 contains the msbs and a0 the lsbs of the result. 10.10.3 databytes(), 0x6 vs dsp c prototype: u int16 databytes(void); if the user has taken over the normal operation of the system by switching the pointer in usercodec to point to his own code, he may read data from the data interface through this and the following two functions. this function returns the number of data bytes that can be read. version 1.00, 2004-10-22 40 vlsi solution y
VS1011 VS1011 10. VS1011 registers 10.10.4 getdatabyte(), 0x8 vs dsp c prototype: u int16 getdatabyte(void); reads and returns one data byte from the data interface. this function will wait until there is enough data in the input buffer. 10.10.5 getdatawords(), 0xa vs dsp c prototype: void getdatawords(register i0 y u int16 *d, register a0 u int16 n); read n data byte pairs and copy them in big-endian format (?rst byte to msbs) to d . this function will wait until there is enough data in the input buffer. version 1.00, 2004-10-22 41 vlsi solution y
VS1011 VS1011 11. document version changes 11 document version changes this chapter describes the most important changes to this document. 11.1 version 1.00 for VS1011, 2004-10-22 2 fully quali?ed values to tables in chapter 4. 2 reassigned bga-49 balls for pins dvdd2, dgnd2 and dgnd3 in chapter 5.2. 11.2 version 0.71 for VS1011, 2004-07-20 2 added instructions to add 100 k pull-down resistor to unused gpios to chapter 5.2. 11.3 version 0.70 for VS1011, 2004-05-13 2 removed sm jump. 11.4 version 0.62 for VS1011, 2004-03-24 2 rewrote and clari?ed chapter 8.2, supported audio codecs. 11.5 version 0.61 for VS1011, 2004-03-11 2 added samplerate and bitrate tables to chapter 8.6.9, . 11.6 version 0.6 for VS1011, 2004-02-13 2 added bga-49 to packages and pin descriptions (chapter 5). 2 added new chapter 8.2, supported audio codecs. 11.7 version 0.5 for VS1011, 2004-01-15 2 modi?ed analog characteristics (chapter 4.1) 11.8 version 0.4 for VS1011, 2003-12-23 2 added sdi/sci examples (chapter 7.6) version 1.00, 2004-10-22 42 vlsi solution y
VS1011 VS1011 12. contact information 12 contact information vlsi solution oy hermiankatu 6-8 c fin-33720 tampere finland fax: +358-3-316 5220 phone: +358-3-316 5230 email: sales@vlsi.? url: http://www.vlsi.?/ note: if you have questions, ?rst see http://www.vlsi.?/VS1011/faq/ . version 1.00, 2004-10-22 43 vlsi solution y


▲Up To Search▲   

 
Price & Availability of VS1011

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X